package com.atguigu.gmall.all.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class LoginController {

    //转发登录页面
    @GetMapping("/login.html")
    public String login(String originUrl, Model model){//参数是获取原页面路径,以及需要返回的model对象
        //前端页面——originUrl: [[${originUrl}]],
        model.addAttribute("originUrl",originUrl);

        return  "login";
    }
}
